import coffee from './assets/img1.jpg';
import logo from './assets/img2.png';
// 插入图片函数
function insertImg(url) {
    var img = new Image();
    console.log(url); // 输出url
    img.onload = function () {
        console.log('finished');
        document.body.appendChild(img);
    };
    img.src = url;
}

insertImg('dist/' + coffee);
insertImg(logo);